﻿using DataWorks_Sqlite.MappingClass;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataWorks_Sqlite.MappingClassConfig
{
    internal class dw_props_unity_config : IEntityTypeConfiguration<dw_props_unify>
    {
        public void Configure(EntityTypeBuilder<dw_props_unify> builder)
        {
            builder.ToTable("dw_props_unify");
            builder.HasKey(b => b.key);
            builder.Property(a => a.loginname).HasMaxLength(255).IsRequired();
            builder.Property(a => a.vehicle).HasMaxLength(255).IsRequired();
            builder.Property(a => a.project).HasMaxLength(255).IsRequired();
            builder.Property(a => a.ecnumber).HasMaxLength(255).IsRequired();
            builder.Property(a => a.odpath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.cleanedpath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.txtcombpath1st).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.selecteddate).HasMaxLength(2000).IsRequired();
            builder.Property(a => a.spikechanidx).HasMaxLength(255).IsRequired();
            builder.Property(a => a.spikedpath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.matfilepath).HasMaxLength(2000).IsRequired();
            builder.Property(a => a.matfilename).HasMaxLength(2000).IsRequired();
            builder.Property(a => a.causalorder).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.uncausalorder).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.lowpass).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.usefilter).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.predictpath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.txtcombpath2ed).HasMaxLength(1000).IsRequired();

        }
    }
}
